Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@shopify/theme-check-common
Advanced tools
Theme Check helps you follow best practices by analyzing the files inside your Shopify theme.
Theme Check is available to code editors that support the Language Server Protocol.
You may be interested by the sibling modules:
@shopify/theme-check-common
: (you are here) npm module to run checks on a Theme (runtime agnostic).@shopify/theme-check-node
: npm module to run checks from a Node.js runtime.@shopify/theme-check-browser
: npm module to run checks in a Browser.There are three libraries:
yarn add @shopify/theme-check-node
yarn add @shopify/theme-check-common
yarn add @shopify/theme-check-browser
This repo only contains the library over the functionality. The CLI is implemented in Shopify/cli.
For CLI usage documentation, refer to shopify.dev.
The node version comes with batteries included. All you need is the root path of the theme.
// simple-cli.ts
import { check } from '@shopify/theme-check-node';
async function main() {
const root = process.cwd();
const offenses = await check(root);
console.log(offenses);
}
main();
The browser version is a bit more complex, you need to provide your own implementation of all the dependency injections.
import { simpleCheck, recommended, ThemeData, Config, Dependencies } from '@shopify/theme-check-browser';
async function main() {
const themeDesc = {
'snippets/product-card.liquid': '{{ product | image_url | image_tag }}',
'snippets/for-loop.liquid': '{% for variant in product.variants %}...{% endfor %}',
};
const config: Config = {
checks: recommended,
settings: {},
root: '/',
};
const dependencies: Dependencies = {
// ...
};
const offenses = await simpleCheck(themeDesc, config, dependencies);
console.log(offenses);
}
main();
See CONTRIBUTING.md.
FAQs
Theme Check
The npm package @shopify/theme-check-common receives a total of 59,824 weekly downloads. As such, @shopify/theme-check-common popularity was classified as popular.
We found that @shopify/theme-check-common demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.